Dynomotion

Group: DynoMotion Message: 14419 From: lmp582002 Date: 2/18/2017
Subject: Encoder Noise

I just purchased some 1.8 degree stepper motors to run closed loop with my KStep. I am using AMT102-V encoders set at 400 counts/rev. The encoders are plugged directly into JP6.


http://www.cui.com/product/resource/amt10-v.pdf


My tests on the step response screen show a large amount of noise. Normally when I use US digital encoders the red "position" trend line almost perfectly follows the blue "command" curve. The best I can describe the red line as fuzzy. It bounces around the command by about 30 counts. When I make very small moves the noise level seems to be greater than the actual commanded move. 


Can anyone think of why this could be happening? This encoder has "CMOS" outputs, could that have anything to do with it? Maybe it is driving JP6 too hard, and somhow causing noise? 


I have set my deadband to 40 with a gain of 0. This seems to prevent the stepper from constantly vibrating. Does this defeat the purpose of using an encoder at all? 


I would really appreciate any suggestions or help!


Thanks,


Scott


Group: DynoMotion Message: 14420 From: Tom Kerekes Date: 2/18/2017
Subject: Re: Encoder Noise

Hi Scott,

That is typical of low cost capacitive/magnetic/hall encoders as compared to real optical encoders.  Which is why we don't normally recommend using them.  Careful wiring, grounding, shielding may help some amount.  You might read this Thread and the Thread it references:

https://groups.yahoo.com/neo/groups/DynoMotion/conversations/messages/10514

You didn't post a plot.  Or explain how it is wired.  You should determine whether it is noise in the output signals or more likely the sensor measurement jitter.  Measurement jitter will not normally result in large position drift, where noise (loss or gaining counts) normally will.

HTH

Regards

TK


On 2/18/2017 2:08 PM, lmp582002@... [DynoMotion] wrote:
 

I just purchased some 1.8 degree stepper motors to run closed loop with my KStep. I am using AMT102-V encoders set at 400 counts/rev. The encoders are plugged directly into JP6.


http://www.cui.com/product/resource/amt10-v.pdf


My tests on the step response screen show a large amount of noise. Normally when I use US digital encoders the red "position" trend line almost perfectly follows the blue "command" curve. The best I can describe the red line as fuzzy. It bounces around the command by about 30 counts. When I make very small moves the noise level seems to be greater than the actual commanded move. 


Can anyone think of why this could be happening? This encoder has "CMOS" outputs, could that have anything to do with it? Maybe it is driving JP6 too hard, and somhow causing noise? 


I have set my deadband to 40 with a gain of 0. This seems to prevent the stepper from constantly vibrating. Does this defeat the purpose of using an encoder at all? 


I would really appreciate any suggestions or help!


Thanks,


Scott



Group: DynoMotion Message: 14421 From: lmp582002 Date: 2/18/2017
Subject: Re: Encoder Noise
Tom,

I have wired it with shielded cable, grounded to the cabinet. When there is no motion on the axis and I watch the encoders it shows things moving around slightly. It is single ended - wired straight into JP6 on the KStep board.

I am also attaching the plot of one of the moves. I read through the post, and two others. It didnt specify what I can do to make it managable. Is it best to simply increase the deadband until it stops jiggering? I am not familiar with tuning a stepper other than just adjusting the velocity, accelleration, and jerk. Is there more that can be done to filter out the noise? I feel a bit stuck with these encoders and motors, I dont really have the budget to replace them with optical encoders.

Thanks,

Scott
  @@attachment@@
Group: DynoMotion Message: 14422 From: Tom Kerekes Date: 2/18/2017
Subject: Re: Encoder Noise [1 Attachment]

Hi Scott,

Connecting the shield to the cabinet (earth ground?) may not be the best choice.  Earth ground can be very noisy so in this way you couple the noise to the encoder.  See if KFLOP DC GND works better.

I assume you meant to say JP6 on KFLOP?  Actually the inputs on JP6 have 150ohm pull down resistors so it takes 2V/150ohms = 13ma to drive the pin to a valid 2V high level.  The spec you sent says the output current is only 2ma.  But somehow it seems to be working.  JP5 might be a better choice as there are no pull down resistors.

The data shows about +/-25 counts of noise.  What distance does this correspond to?  What is the encoder counts/rev and what distance does a rev correspond to mechanically?

You didn't include any of your settings.  But it seems you were testing open loop as the Output is zero.  In this case the axis shouldn't be moving at all.  You are just looking at measurement error.  The encoder says it is moving when it is not.  Doing things like increasing deadband would decrease the amount influence the noise has on driving the Output but your Output is already zero.

With noise like this on the measurement it means there is no way to tell what the axis is really doing.  But because the frequency is so high it is virtually impossible that the axis is really moving in that manner and any output to the motor at that frequency is likely to be ignored or averaged/smoothed out.

When you run closed loop and tune the servo set the gains low enough and add a low pass filter so only a little of the high frequency is allowed to pass to the Output.

Another option is to simply not use the encoder to run closed loop.  You can still use it to detect motor stalls and collisions.  What was your reason for adding the encoders?

Regards
TK

  


On 2/18/2017 5:23 PM, lmp582002@... [DynoMotion] wrote:
 

Tom,


I have wired it with shielded cable, grounded to the cabinet. When there is no motion on the axis and I watch the encoders it shows things moving around slightly. It is single ended - wired straight into JP6 on the KStep board.

I am also attaching the plot of one of the moves. I read through the post, and two others. It didnt specify what I can do to make it managable. Is it best to simply increase the deadband until it stops jiggering? I am not familiar with tuning a stepper other than just adjusting the velocity, accelleration, and jerk. Is there more that can be done to filter out the noise? I feel a bit stuck with these encoders and motors, I dont really have the budget to replace them with optical encoders.

Thanks,

Scott

Group: DynoMotion Message: 14426 From: lmp582002 Date: 2/19/2017
Subject: Re: Encoder Noise [1 Attachment]
Tom,

I am running the encoders for several reasons. Mainly to detect collisions and stalls to shut things down. Also to correct any small errors over time. I was also wanting to squeeze more performance out of the axis. Seems like I can get better speed and accelleration with closed loop. Yes, I am plugged into JP6 on the KFlop.

The motor is direct drive on a 20mm lead screw. Encoder is 400/rev so each pulse takes me 0.0019" x 25 = 0.049". This is on a CNC router, I would want to shut things down of actual positional error was that high.

I havent played with the filters before. However I have PID set up like this:

P=0
I=.02
D=0
Max Output=200
Integrator=200
Error=1e+006

Do you think it would be helpful for me to figure out how the filters work and give that at try? If this were your machine and you kept the encoders, would you still try closed loop or just use them as error checkers?

Thanks,

Scott
Group: DynoMotion Message: 14428 From: Tom Kerekes Date: 2/19/2017
Subject: Re: Encoder Noise

Hi Scott,

Oh wow I missed that part on the resolution was set to only 400ppr.  But that isn't clear whether that is quadrature counts or really "pulses" (cycles).    Their spec says "quadrature resolution" but then says the units are ppr??  It always amazes me how encoder manufacturers are often so vague in their specs.  If you rotate the shaft 1 revolution how many counts does the Position change?

It also seems strange that the encoder counts seem to match the commanded steps.  KStep has 3200 steps per revolution.  The encoder should be either 400 or 1600.  So I would expect a big difference unless you configured an Input or Output Gain.  Did you?  It would be helpful if you posted all your settings so we wouldn't have to guess what the configuration is.

Regarding the PID etc settings: if you aren't running closed loop then they wouldn't be even used at this point.

Regards

TK


On 2/19/2017 8:00 AM, lmp582002@... [DynoMotion] wrote:
 

Tom,


I am running the encoders for several reasons. Mainly to detect collisions and stalls to shut things down. Also to correct any small errors over time. I was also wanting to squeeze more performance out of the axis. Seems like I can get better speed and accelleration with closed loop. Yes, I am plugged into JP6 on the KFlop.

The motor is direct drive on a 20mm lead screw. Encoder is 400/rev so each pulse takes me 0.0019" x 25 = 0.049". This is on a CNC router, I would want to shut things down of actual positional error was that high.

I havent played with the filters before. However I have PID set up like this:

P=0
I=.02
D=0
Max Output=200
Integrator=200
Error=1e+006

Do you think it would be helpful for me to figure out how the filters work and give that at try? If this were your machine and you kept the encoders, would you still try closed loop or just use them as error checkers?

Thanks,

Scott

Group: DynoMotion Message: 14440 From: lmp582002 Date: 2/22/2017
Subject: Re: Encoder Noise
Tom,

I am posting the motor setup. Yes I did put an input gain of 2 to make the output match the input. 

Based off of my settings do you think I can add a filter or something to make the encoder function well closed loop? I only have the "I" value set to .02 so any corrections are pretty small anyway. Maybe it is still better then no encoder at all? It can make gradual positional corrections over time and with the max error shut things down if I loose too many steps?

Any thoughts for me? What do you think is the best solution given the constraints?

Thanks,

Scott
  @@attachment@@
Group: DynoMotion Message: 14443 From: Tom Kerekes Date: 2/22/2017
Subject: Re: Encoder Noise [1 Attachment]

Hi Scott,

With the quadrature and the gain of 2 the plotted encoder resolution would be 3200 counts/rev not 400 counts/rev.  So the resolution would be:

3200counts / 20mm *  25.4mm/in = 4064 counts/inch

So jitter of +/- 25 counts would be +/- 6.2 mils

I thought the one plot you sent earlier was open loop but I realize now you have a deadband setting of 40.  With all errors less than 40 there was never any correction being made so it was effectively the same as an entirely open loop move.

I see you have a 2nd order low pass filter Freq=100 Q=1.4 configured.  This is probably appropriate.

Regarding the question of running open loop or closed loop: If open loop performance meets your requirements I would run open loop.  For encoder feedback to improve accuracy you would need to be able to visually see (by eye ignoring random noise) a difference between the measured Position and the Commanded Destinations while running open loop.  In this case switching to closed loop would have the potential of improving accuracy.   If the errors all appear to be random noise then there would be no benefit to using closed loop.  Ideally you should test under the most demanding modes where your system requires accuracy ie. with cutting loads or high speeds and accelerations.

HTH
Regards
TK


On 2/22/2017 8:38 AM, lmp582002@... [DynoMotion] wrote:
 

Tom,


I am posting the motor setup. Yes I did put an input gain of 2 to make the output match the input. 

Based off of my settings do you think I can add a filter or something to make the encoder function well closed loop? I only have the "I" value set to .02 so any corrections are pretty small anyway. Maybe it is still better then no encoder at all? It can make gradual positional corrections over time and with the max error shut things down if I loose too many steps?

Any thoughts for me? What do you think is the best solution given the constraints?

Thanks,

Scott

Group: DynoMotion Message: 14523 From: janbbeck Date: 3/20/2017
Subject: Re: Encoder Noise
I want to share my experiences with the CUI encoders, as I think it is pertinent to this question. When the question was first asked, I was still wating on delivery of a second CUI unit to make sure the original was not broken. This is still the same effort as detailed in another thread on this list about running a stepper as a servo motor. The whole saga is here: https://sites.google.com/site/janbeck/optical-table-cnc-lathe---motor-selection
But for the sake of brevity:

The CUI sensor gave me a lot of trouble at first. The signals are differential, and yet unless the grounding tab on the wire is hooked up, even a motor far away will cause noise sufficient to have the encoder tester run away. consider the following setup:


Here, the encoder is simply hooked up to an encoder tester which is powered by a battery. You can see that the grounding tab of the encoder wire is floating. This arrangement is resting on the Y motor. If now even only the X motor is enabled The count will run away. In spite of the fact that the encoder is not connected to the motor or Kflop/SnapAMP in any way. Connecting the encoder to the differential inputs of the SnapAMP yields the same result.
With the entire system powered down and unplugged, I can still make the (battery powered) encoder jump by touching/wiggling the connector on the encoder. I have never had this behavior with any other encoder. I expected better, especially from a differential signal. Usually, my first step in testing an encoder is connecting it to a tester, of course. That is what it is there for. So when even the battery isolated and differential encoder acted funny, I thought that I had bought a bad unit or cable, so I ordered replacements for both. Only when the replacement units acted exactly the same did I work out what the problem was.

As soon as the grounding tab makes contact with the Y motor in any way (even when just pressed to it by a magnet), the problem goes away completely. The encoder count is stable. Tuning works just as well as with any other encoder I have used. I do not see the problems that Scott mentioned. That leads me to believe that his problem is signal related rather than intrinsic to this type of encoder. Remember that I configured it to 4096 llines while he was using 400. If the encoder cannot keep a steady count at 400, it wont do so with 4000.

You can also see that I used some lacquer to fix the encoder in place. There are two mechanical issues I found with these units. First, the encoder itself snaps into latches on the plastic mount. These latches are very weak. I broke one when trying to remove the first encoder. I broke the other even with trying to be careful the first time I mounted it. See here (still intact latch on left, broken on right):

 
 

The second problem is that even when the latches are intact the encoder can move a little in its plastic mount. This may or may not be a problem. To make sure that this may not be a problem, I used the lacquer.


Hope this helps.

Jan

---In DynoMotion@yahoogroups.com, <tk@...> wrote :

Hi Scott,

That is typical of low cost capacitive/magnetic/hall encoders as compared to real optical encoders.  Which is why we don't normally recommend using them.  Careful wiring, grounding, shielding may help some amount.  You might read this Thread and the Thread it references:

https://groups.yahoo.com/neo/groups/DynoMotion/conversations/messages/10514

You didn't post a plot.  Or explain how it is wired.  You should determine whether it is noise in the output signals or more likely the sensor measurement jitter.  Measurement jitter will not normally result in large position drift, where noise (loss or gaining counts) normally will.

HTH

Regards

TK


On 2/18/2017 2:08 PM, lmp582002@... [DynoMotion] wrote:
 

I just purchased some 1.8 degree stepper motors to run closed loop with my KStep. I am using AMT102-V encoders set at 400 counts/rev. The encoders are plugged directly into JP6.


http://www.cui.com/product/resource/amt10-v.pdf


My tests on the step response screen show a large amount of noise. Normally when I use US digital encoders the red "position" trend line almost perfectly follows the blue "command" curve. The best I can describe the red line as fuzzy. It bounces around the command by about 30 counts. When I make very small moves the noise level seems to be greater than the actual commanded move. 


Can anyone think of why this could be happening? This encoder has "CMOS" outputs, could that have anything to do with it? Maybe it is driving JP6 too hard, and somhow causing noise? 


I have set my deadband to 40 with a gain of 0. This seems to prevent the stepper from constantly vibrating. Does this defeat the purpose of using an encoder at all? 


I would really appreciate any suggestions or help!


Thanks,


Scott